package com.hk.common.utils;

import java.util.UUID;

/**
 * @author zhuiyv
 */
public class UuidUtils {

    public static String createUuid(){
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    /**
     * 短uuid  10位
     * @return
     */
    public static String shortUuid(){
        return createUuid(10);
    }

    public static String createUuid(int len){
        String str = createUuid();
        return str.substring(0,len);
    }

    public static void main(String[] args) {
        System.out.println(createUuid());
    }

}
